/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by:   焦质晔
 * @Last Modified time: 2019-06-20 15:45:00
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 获取专用工具退库列表
export const getBackStorageList = params => axios.get(`${SERVER.TOOLMANAGEMENT}/recevingBill/getReturnBill`, {
  params
});

// 获取入库单号列表
export const getBillNoList = params => axios.get(`${SERVER.TOOLMANAGEMENT}/recevingBill/getWarehousingList`, {
  params
});

// 获取工具列表
export const getToolsList = params => axios.get(`${SERVER.TOOLMANAGEMENT}/recevingBill/getToolsList`, {
  params
});

// 获取退库工具列表
export const getOutToolsList = params => axios.get(`${SERVER.TOOLMANAGEMENT}/recevingBill/getOutToolsList`, {
  params
});

// 获取退库单工具明细
export const getRecevingBillDetail = params => axios.get(`${SERVER.TOOLMANAGEMENT}/recevingBill/getRecevingBillDetail`, {
  params
});

// 保存退库单
export const saveRecevingBill = params => axios.post(`${SERVER.TOOLMANAGEMENT}/recevingBill/saveRecevingBill`, params);

// 删除退库单
export const deleteRecevingBill = params => axios.post(`${SERVER.TOOLMANAGEMENT}/recevingBill/deleteRecevingBill`, params);

// 删除工具
export const deleteTools = params => axios.post(`${SERVER.TOOLMANAGEMENT}/recevingBill/deleteTools`, params);

// 处理库存
export const dealStockBack = params => axios.post(`${SERVER.TOOLMANAGEMENT}/recevingBill/dealStockBack`, params);

// 是否原单据退库
export const isOriginalDocuments = params => axios.post(`${SERVER.TOOLMANAGEMENT}/recevingBill/isOriginalDocuments`, params);

// 获取采购退库单打印信息
export const printReturnStorageBill = params => axios.get(`${SERVER.TOOLMANAGEMENT}/recevingBill/printReturnStorageBill`, {
  params
});

// 参数查询
export const doSearch = params => axios.post(`${SERVER.DMSCLOUD_BASEDATA}/params/doSearch`, params);
